delete from QueueEntry
delete from MessageFragment
delete from Message

SELECT DISTINCT(BatchId) from QueueEntry

select BatchId, EnqueueTime, DequeueTime, DeliveryTime
from QueueEntry
where BatchId IS NULL

select BatchId, count(BatchId) 
  from QueueEntry
group
    by BatchId

select * from MessageFragment
select * from Message

select distinct (BatchId) from QueueEntry

select * from Subscription



select * from Client c inner join Subscriber s ON c.DbId = s.SubscriberDbId
select * from Client c inner join Publisher s ON c.DbId = s.PublisherDbId

select * from Subscription
select * from ReceivePort

select * from NamespaceDefinition
select * from Filter
select * from Endpoint
select * from Topic

select * from Subscription_Filter
select * from Subscription_Endpoint

delete from Subscription_Filter
delete from Endpoint
delete from NamespaceDefinition
delete from Filter
delete from Response
delete from Subscription
delete from ReceivePort
delete from Pipeline
delete from Subscriber
delete from Publisher
delete from Client

delete from QueueEntry
delete from MessageFragment
delete from ErrorMessage
delete from Message
